<template>
   <div class="index">
  <transition name="ly" mode="out-in">
     <router-view />
   </transition>
    <div class="tabbar">
        <van-tabbar v-model="active" route>
  <van-tabbar-item replace to="/index/home" icon="home-o">首页</van-tabbar-item>
  <van-tabbar-item replace to="/index/baobao" icon="search">爆爆团</van-tabbar-item>
  <van-tabbar-item replace to="/index/order" icon="friends-o">订单</van-tabbar-item>
  <van-tabbar-item replace to="/index/my" icon="setting-o">我的</van-tabbar-item>
</van-tabbar>
    </div>
  </div>
</template>

<script>
export default {
 data() {
    return {
        active: 0,
    };
 },
}
</script>

<style scoped>
.tabbar{
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 20px;
  position: fixed;
  bottom: 0;
  width: 100%;
  border-top: 1px solid #ccc;
  box-sizing: border-box;
  background-color: white;
}
</style>